#include"udp_client.hpp"
#include <iostream>
using namespace zxf;

void usage()
{
    std::cout<<"\n usage:\n     ./udp_client server_ip server_port\n\n"<<std::endl;

}


int main(int argc, char* argv[])
{
    if(argc != 3)
    {
        usage();
        exit(USAGE_ERR);
    }
    uint16_t port = std::stoi(argv[2]);//获取端口号
    std::string ip = argv[1];

    client* co = new client(port,ip);//创建服务器对象
    co->initserer();//初始化服务器
    co->runserver();//启动服务器
    
    std::cout<<"server:测试";
}